import "./global.css";

import { Suspense, StrictMode } from "react";
import { createRoot } from "react-dom/client";
import { RouterProvider, createBrowserRouter } from "react-router-dom";
import routes from "@/routes";

createRoot(document.getElementById("root") as HTMLElement).render(
  <StrictMode>
    <Suspense fallback={<div>loading...</div>}>
      <RouterProvider
        router={createBrowserRouter(routes)}
        fallbackElement={<p>Loading...</p>}
      />
    </Suspense>
  </StrictMode>
);
